package studio.wetrack.dinner.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import studio.wetrack.dinner.domain.Chopsticks;
import studio.wetrack.dinner.service.ChopsticksService;

/**
 * Created by zhanghong on 2017/9/23.
 */
//@Service("defaultChopstickServiceImpl")
public class ChopstickServiceLogTimeImpl implements ChopsticksService{

    @Autowired
    ChopstickServiceImpl chopstickServiceImpl;


    @Override
    public Chopsticks getChopsticks() {
        long startTime = System.currentTimeMillis();
        Chopsticks chopsticks = chopstickServiceImpl.getChopsticks();
        long executionTime = System.currentTimeMillis() - startTime;
        System.out.printf("getChopsticks executing time %d ms\n", executionTime);
        return chopsticks;
    }

    @Override
    public void releaseChopsticks(Chopsticks chopsticks) {

    }
}
